<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
  
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  <title>WPF Development Placeholder</title>

  
  
  <meta name="id" content="64e3dc97-5125-541e-9e84-7f9303e95f08">

  
  <meta name="revisionNumber" content="1">

</head><body>
<div style="border: 3pt solid rgb(219, 229, 241); padding: 0in; background: rgb(219, 229, 241) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<h2><a name="_Toc235247788">WPF Development<br>
</a></h2>
</div>

<ol>

  <li><span style="font-family: Helvetica,Arial,sans-serif;">The first
step in creating a WPF Facebook application is to setup the application
on the Facebook Developer site.</span></li>
  <li><span style="font-family: Helvetica,Arial,sans-serif;">The next
step is hooking up the authentication and any required extended
permissions.</span></li>
  <li><span style="font-family: Helvetica,Arial,sans-serif;">Last, you
can access the api calls directly or use the BindingManager</span></li>
</ol>

<span style="font-size: 10pt; line-height: 115%; font-family: Helvetica,Arial,sans-serif;"><br style="page-break-before: always;" clear="all">
</span>
<div style="border: 3pt solid rgb(219, 229, 241); padding: 0in; background: rgb(219, 229, 241) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<h2><a name="_Toc236726357">Register a Facebook Application</a></h2>
</div>

<span style="font-size: 10pt; line-height: 115%; font-family: Helvetica,Arial,sans-serif;"><br style="page-break-before: always;" clear="all">
</span>
<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNormal">When
creating your application on the Facebook web site,
verify these settings depending on which application type you will
create.<span style="">&nbsp; </span>Other settings may be left as the
default
value, populated as desired or modified later in development.</p>

<table class="LightList-Accent11" style="border: medium none ; border-collapse: collapse; font-family: Helvetica,Arial,sans-serif;" border="1" cellpadding="0" cellspacing="0">

  <tbody>
    <tr style="">
      <td style="border-style: solid none none solid; border-color: rgb(79, 129, 189) -moz-use-text-color -moz-use-text-color rgb(79, 129, 189); border-width: 1pt medium medium 1pt; padding: 0in 5.4pt; background: rgb(79, 129, 189) none repeat scroll 0% 50%; width: 82.7pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="110">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center"><b><span style="color: white;">Settings Tab<o:p></o:p></span></b></p>
      </td>
      <td style="border-style: solid none none; border-color: rgb(79, 129, 189) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 0in 5.4pt; background: rgb(79, 129, 189) none repeat scroll 0% 50%; width: 93.7pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="125">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center"><b><span style="color: white;">Setting<o:p></o:p></span></b></p>
      </td>
      <td style="border-style: solid none none; border-color: rgb(79, 129, 189) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 0in 5.4pt; background: rgb(79, 129, 189) none repeat scroll 0% 50%; width: 2.5in; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="240">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center"><b><span style="color: white;">WPF<o:p></o:p></span></b></p>
      </td>
      <td style="border-style: solid solid none none; border-color: rgb(79, 129, 189) rgb(79, 129, 189) -moz-use-text-color -moz-use-text-color; border-width: 1pt 1pt medium medium; padding: 0in 5.4pt; background: rgb(79, 129, 189) none repeat scroll 0% 50%; width: 193.5pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" valign="top" width="258">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center"><b><span style="color: white;">Silverlight<o:p></o:p></span></b></p>
      </td>
    </tr>
    <tr style="">
      <td style="border-style: solid none solid solid; border-color: rgb(79, 129, 189) -moz-use-text-color rgb(79, 129, 189) rgb(79, 129, 189); border-width: 1pt medium 1pt 1pt; padding: 0in 5.4pt; width: 82.7pt;" valign="top" width="110">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center"><b>Basic<o:p></o:p></b></p>
      </td>
      <td style="border-style: solid none; border-color: rgb(79, 129, 189) -moz-use-text-color; border-width: 1pt medium; padding: 0in 5.4pt; width: 93.7pt;" valign="top" width="125">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center">Developers</p>
      </td>
      <td style="border-style: solid none; border-color: rgb(79, 129, 189) -moz-use-text-color; border-width: 1pt medium; padding: 0in 5.4pt; width: 2.5in;" valign="top" width="240">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center">Add any team developers</p>
      </td>
      <td style="border-style: solid solid solid none; border-color: rgb(79, 129, 189) rgb(79, 129, 189) rgb(79, 129, 189) -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 193.5pt;" valign="top" width="258">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center">Add any team developers</p>
      </td>
    </tr>
    <tr style="">
      <td style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(79, 129, 189); border-width: medium medium medium 1pt; padding: 0in 5.4pt; width: 82.7pt;" valign="top" width="110">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center"><b>Connect<o:p></o:p></b></p>
      </td>
      <td style="border: medium none ; padding: 0in 5.4pt; width: 93.7pt;" valign="top" width="125">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center">Connect URL</p>
      </td>
      <td style="border: medium none ; padding: 0in 5.4pt; width: 2.5in;" valign="top" width="240">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center">Leave blank</p>
      </td>
      <td style="border-style: none solid none none; border-color: -moz-use-text-color rgb(79, 129, 189) -moz-use-text-color -moz-use-text-color; border-width: medium 1pt medium medium; padding: 0in 5.4pt; width: 193.5pt;" valign="top" width="258">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center"><a href="http://localhost/">http://localhost:[port#</a>]
for development</p>
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center">(change to your production URL for live app)</p>
      </td>
    </tr>
    <tr style="">
      <td style="border-style: solid none solid solid; border-color: rgb(79, 129, 189) -moz-use-text-color rgb(79, 129, 189) rgb(79, 129, 189); border-width: 1pt medium 1pt 1pt; padding: 0in 5.4pt; width: 82.7pt;" valign="top" width="110">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center"><b>Advanced<o:p></o:p></b></p>
      </td>
      <td style="border-style: solid none; border-color: rgb(79, 129, 189) -moz-use-text-color; border-width: 1pt medium; padding: 0in 5.4pt; width: 93.7pt;" valign="top" width="125">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center">Application Type</p>
      </td>
      <td style="border-style: solid none; border-color: rgb(79, 129, 189) -moz-use-text-color; border-width: 1pt medium; padding: 0in 5.4pt; width: 2.5in;" valign="top" width="240">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center">Desktop</p>
      </td>
      <td style="border-style: solid solid solid none; border-color: rgb(79, 129, 189) rgb(79, 129, 189) rgb(79, 129, 189) -moz-use-text-color; border-width: 1pt 1pt 1pt medium; padding: 0in 5.4pt; width: 193.5pt;" valign="top" width="258">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center">Web</p>
      </td>
    </tr>
    <tr style="">
      <td style="border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(79, 129, 189) rgb(79, 129, 189); border-width: medium medium 1pt 1pt; padding: 0in 5.4pt; width: 82.7pt;" valign="top" width="110">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center"><b>Advanced<o:p></o:p></b></p>
      </td>
      <td style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color rgb(79, 129, 189); border-width: medium medium 1pt; padding: 0in 5.4pt; width: 93.7pt;" valign="top" width="125">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center">Sandbox Mode</p>
      </td>
      <td style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color rgb(79, 129, 189); border-width: medium medium 1pt; padding: 0in 5.4pt; width: 2.5in;" valign="top" width="240">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center">On for dev, Off for live app</p>
      </td>
      <td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(79, 129, 189) rgb(79, 129, 189) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding: 0in 5.4pt; width: 193.5pt;" valign="top" width="258">
      <p class="MsoNormal" style="margin: 0in 0in 0.0001pt; text-align: center; line-height: normal;" align="center">On for dev, Off for live app</p>
      </td>
    </tr>
  </tbody>
</table>

<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNormal">After
saving changes, be sure to note the API Key and
Application Secret, which will be used by the FDT to identify your
application
when accessing the Facebook Platform APIs.</p>

<span style="font-size: 10pt; line-height: 115%; font-family: Helvetica,Arial,sans-serif;"><br style="page-break-before: always;" clear="all">
</span>
<div style="border: 3pt solid rgb(219, 229, 241); padding: 0in; background: rgb(219, 229, 241) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<h2><a name="_Toc236726357">Authentication</a></h2>
</div>

<span style="font-size: 10pt; line-height: 115%; font-family: Helvetica,Arial,sans-serif;"><br style="page-break-before: always;" clear="all">
</span>
<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNormal">WPF
Applications should leverage the built-in functionality of the Desktop
Session object.&nbsp; Construct an instance of DesktopSession passing
in isWpf = true and an optional list of required extended
permissions.&nbsp; Then call login.<br>
</p>

<span style="font-size: 10pt; line-height: 115%; font-family: Helvetica,Arial,sans-serif;">
</span>
<p class="MsoNormal" style="margin-left: 22.5pt;"><b><span style="font-family: &quot;Courier New&quot;;">Visual C#</span></b><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><u1:p></u1:p><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
DesktopSession </span>session = <span style="color: blue;">new</span>
DesktopSession(<span style="color: rgb(163, 21, 21);">"aff9f004793a1d32d26fe2361d5fc723"</span>,
<span style="color: blue;">null</span>, <span style="color: blue;">null</span>,
<span style="color: blue;">true</span>, <span style="color: blue;">new</span>
<span style="color: rgb(43, 145, 175);">List</span>&lt;Enums.ExtendedPermissions&gt;(){Enums.ExtendedPermissions.read_stream,
Enums.ExtendedPermissions.publish_stream});<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span>session.Login();<o:p></o:p></span></p>

<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNormal">The
above code sample shows creating the Session with a set of required
permissions.&nbsp; Using this particular constructor will result in the
user getting a web page prompting for these permissions after they
login.&nbsp; If you application does not require and extended
permissions, you can use the constructor that does not include the list
of permissions.<br>
</p>

<span style="font-size: 10pt; line-height: 115%; font-family: Helvetica,Arial,sans-serif;">
</span><b><span style="font-family: &quot;Courier New&quot;;"></span></b>

<div style="border: 3pt solid rgb(219, 229, 241); padding: 0in; background: rgb(219, 229, 241) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<h2><a name="_Toc236726357">Calling Facebook<br>
</a></h2>
</div>

<span style="font-size: 10pt; line-height: 115%; font-family: Helvetica,Arial,sans-serif;"><br style="page-break-before: always;" clear="all">
</span>
<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNormal">A
WPF application can either access the API directly or use the
BindingManager.&nbsp; Here is a code sample of using the api directly<br>
</p>

<span style="font-size: 10pt; line-height: 115%; font-family: Helvetica,Arial,sans-serif;">
</span>
<p class="MsoNormal" style="margin-left: 22.5pt;"><b><span style="font-family: &quot;Courier New&quot;;">Visual C#</span></b><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><u1:p></u1:p><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="color: rgb(43, 145, 175);">Api</span>
api = <span style="color: blue;">new</span> <span style="color: rgb(43, 145, 175);">Api</span>(session);<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><span style="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span><span style="color: blue;">var</span>
friends = api.Friends.GetUserObjects();<o:p></o:p></span></p>

<p><span style="font-family: Helvetica,Arial,sans-serif;">If you want
to use the BindingHelper classes instead of using the api, you can use
the following.<br>
</span></p>

<p class="MsoNormal" style="margin-left: 22.5pt;"><b><span style="font-family: &quot;Courier New&quot;;">Visual C#</span></b><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><u1:p></u1:p><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;">
</p>

<p class="MsoNormal"><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;; color: blue;">&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; var</span><span style="font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;;">
service = <span style="color: rgb(43, 145, 175);">BindingManager</span>.CreateInstance(session);</span></p>

<div style="border: 3pt solid rgb(219, 229, 241); padding: 0in; background: rgb(219, 229, 241) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<h2><a name="_Toc236726357">Resources<br>
</a></h2>
</div>


<span style="font-size: 10pt; line-height: 115%; font-family: Helvetica,Arial,sans-serif;">
</span>
<p>
</p>
<span style="font-family: Helvetica,Arial,sans-serif;"></span><span style="font-family: Helvetica,Arial,sans-serif;"></span><span style="font-family: Helvetica,Arial,sans-serif;"></span><span><span style="font-family: Helvetica,Arial,sans-serif;"><br>
</span></span>
<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNoSpacing"><span class="MsoIntenseEmphasis">Facebook Developer
Toolkit:<span style="">&nbsp; </span></span><a href="http://facebooktoolkit.codeplex.com/"><span class="MsoSubtleReference"><span style="text-decoration: none;">http://facebooktoolkit.codeplex.com</span></span></a></p>

<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNoSpacing">The
CodePlex home of the Facebook Developer Toolkit
project.<span style="">&nbsp; </span>Download the toolkit, sample
code &amp; documentation.</p>

<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNoSpacing"><span class="MsoIntenseEmphasis"><span style="text-transform: none; font-weight: normal;"><o:p>&nbsp;</o:p></span></span></p>

<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNoSpacing"><span class="MsoIntenseEmphasis">Facebook Developer WIKI
Page:<span style="">&nbsp; </span></span><span class="MsoSubtleReference"><a href="http://wiki.developers.facebook.com/index.php/Main_Page">http://wiki.developers.facebook.com/index.php/Main_Page</a><o:p></o:p></span></p>

<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNoSpacing">Facebook
Developer wiki, the official documentation for
the Facebook Platform.</p>

<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNoSpacing"><span class="MsoIntenseEmphasis"><span style="text-transform: none; font-weight: normal;"><o:p>&nbsp;</o:p></span></span></p>
<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNoSpacing"><span class="MsoIntenseEmphasis">Extended Permissions
Documentation: </span><span class="MsoSubtleReference"><a href="http://wiki.developers.facebook.com/index.php/Extended_permissions">http://wiki.developers.facebook.com/index.php/Extended_permissions</a><o:p></o:p></span></p>

<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNoSpacing"><span class="MsoIntenseEmphasis">Official documentation for
extended permissions.</span><span class="MsoIntenseEmphasis"><span style="text-transform: none; font-weight: normal;"><o:p></o:p></span></span></p>

<p style="font-family: Helvetica,Arial,sans-serif;" class="MsoNoSpacing"><span class="MsoIntenseEmphasis"><o:p>&nbsp;</o:p></span></p>
<br>
</body></html>